package universal.schema.util;

public class RuntimeSettings {
	public static final String APPLICATION_NAME = "universalschema";
	public static final String VERSION_ID = " version 0.1"
			+ " dated February 18, 2013";
	public static final String SERVER_IP = "localhost";
	public static String databaseName = "universalschema";
	static String dbUserID = "root";
	// "" for apple Macbook Air
	static String dbPassword = "101187";
	public static String RUN_MODE = "Test"; // "Production"; //
	public static boolean IS_IN_DEBUG_MODE = true; // false; //
	static int portNo = 3306;// 5432; //
	public static String scriptSql[] = {
		// " drop database if exists bookstore;",
		// " create database bookstore;",
		" use studentProfile;",
		"DROP TABLE IF EXISTS student_login;",
		
		"DROP TABLE IF EXISTS student_interest",
		
		"DROP TABLE IF EXISTS interests",
		
		"DROP TABLE IF EXISTS student;",
		
		
		"CREATE TABLE  student_login ("
				+ "id int(10) unsigned NOT NULL AUTO_INCREMENT,"
				+ "username varchar(45) NOT NULL,"
				+ "password varchar(45) NOT NULL," + "PRIMARY KEY (`id`));",

		"CREATE TABLE interests("
				+"interest_id int(10) auto_increment not null,"
				+"interest_name varchar(20) not null,"
				+"primary key(interest_id)"
				+");",
								
		"CREATE TABLE student("	
				+ "student_id int(10) auto_increment not null,"
				+ "name varchar(45) not null,"
				+ "dob date,"
				+ "imageurl varchar(100),"
				+ "rollno varchar(15) not null,"
				+ "email varchar(30) not null,"
				+ "mobile varchar(10) not null,"
				+ "lastlogged TIMESTAMP default '0000-00-00 00:00:00',"
				+ "unique(rollno),"
				+ "primary key(student_id)"
				+ ");" ,

		"CREATE TABLE student_interest("
				+"id int(10) auto_increment not null,"
				+ "st_id int(10) not null,"
				+ "ins_id int(10) not null,"
				+ "primary key(id),"
				+ "foreign key (st_id) references student(student_id),"
				+ "foreign key (ins_id) references interests(interest_id)"
				+");"

	};

}
